package com.han.gift.entity;


import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * (Tenant)表实体类
 *
 * @author makejava
 * @since 2023-02-25 00:44:39
 */
@SuppressWarnings("serial")
@Data
@TableName("t_tenant")
public class Tenant extends Model<Tenant> {


    @TableField("id")
    private Long id;


    @TableField("company_name")
    @NotBlank(message = "租户名称不能为空!")
    private String companyName;


    @TableField("company_num")
    @NotBlank(message = "租户电话不能为空!")
    private String companyNum;


    @TableField("register_time")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date registerTime;

    //0待审核，1 审核通过 ， 2审核失败
    @TableField("state")
    private Integer state;


    @TableField("address")
    @NotBlank(message = "租户地址不能为空!")
    private String address;


    @TableField("logo")
    private String logo;

    //店铺管理员
    @TableField("admin_id")
    private Long adminId;

    //类型id
    @TableField("type_id")
    @NotNull(message = "租户类型不能为空")
    private Long typeId;

    @TableField(exist = false)
    private TenantType tenantType;
    @TableField(exist = false)
    private Employee admin;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }

    public String getCompanyNum() {
        return companyNum;
    }

    public void setCompanyNum(String companyNum) {
        this.companyNum = companyNum;
    }

    public Date getRegisterTime() {
        return registerTime;
    }

    public void setRegisterTime(Date registerTime) {
        this.registerTime = registerTime;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getLogo() {
        return logo;
    }

    public void setLogo(String logo) {
        this.logo = logo;
    }

    public Long getAdminId() {
        return adminId;
    }

    public void setAdminId(Long adminId) {
        this.adminId = adminId;
    }

    public Long getTypeId() {
        return typeId;
    }

    public void setTypeId(Long typeId) {
        this.typeId = typeId;
    }

    /**
     * 获取主键值
     *
     * @return 主键值
     */

    }

